/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package uimigration.Interactions.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

import uimigration.Interactions.Content;
import uimigration.Interactions.EditContent;
import uimigration.Interactions.InteractionsPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Edit Content</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link uimigration.Interactions.impl.EditContentImpl#getEditatbleContent <em>Editatble Content</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class EditContentImpl extends BehaviourImpl implements EditContent {
	/**
	 * The cached value of the '{@link #getEditatbleContent() <em>Editatble Content</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEditatbleContent()
	 * @generated NOT
	 * @ordered
	 */
	protected EList<Content> editatbleContent;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected EditContentImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return InteractionsPackage.Literals.EDIT_CONTENT;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated NOT
	 */
	public EList<Content> getEditatbleContent() {
		if (editatbleContent == null) {
			editatbleContent = new EObjectContainmentEList<Content>(Content.class, this,
					InteractionsPackage.EDIT_CONTENT__EDITATBLE_CONTENT);
		}
		
		return editatbleContent;
	}

	@Override
	public EList<EditContent> getEditatbleContentList() {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd,
			int featureID, NotificationChain msgs) {
		switch (featureID) {
			case InteractionsPackage.EDIT_CONTENT__EDITATBLE_CONTENT:
				return ((InternalEList<?>)getEditatbleContent()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case InteractionsPackage.EDIT_CONTENT__EDITATBLE_CONTENT:
				return getEditatbleContent();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case InteractionsPackage.EDIT_CONTENT__EDITATBLE_CONTENT:
				getEditatbleContent().clear();
				getEditatbleContent().addAll((Collection<? extends Content>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case InteractionsPackage.EDIT_CONTENT__EDITATBLE_CONTENT:
				getEditatbleContent().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case InteractionsPackage.EDIT_CONTENT__EDITATBLE_CONTENT:
				return editatbleContent != null && !editatbleContent.isEmpty();
		}
		return super.eIsSet(featureID);
	}

} //EditContentImpl
